﻿<%@ Page Language="C#" MasterPageFile="~/member/mMenber.master" AutoEventWireup="true" CodeBehind="buy_17.aspx.cs" Inherits="map.member.order.buy_17" Title="买家-历史订单" %>
<%@ Register assembly="RuleCode.Common" namespace="RuleCode.Controls" tagprefix="cc1" %>
<%@ Register assembly="AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" namespace="AjaxControlToolkit" tagprefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
    <link href="../../outstyle.css" rel="stylesheet" type="text/css" />
<script src="../../js/dropdowncontent.js" type="text/javascript"></script>
<style type="text/css">
    .OrderFilterDiv
    {
        width:100%;                 
    }
    .OrderFilterDiv a
   {
       background:transparent url(../../img/toggle_bg.gif) no-repeat scroll 0px -80px;
       overflow:hidden ;
       display:block;
       height:20px;
       width:100%;
       margin:0 auto;
       text-indent:-999em;
   }
   .OrderFilterDiv a:hover
   {
       background-position:0px -120px;
   }
   .OrderFilterDiv a.collapsed
   {
       background-position:0px 0px;
   }
   .OrderFilterDiv a.collapsed:hover
   {
       background-position:0px -40px;
   }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <asp:Label ID="Label1" runat="server" Text="买家-历史订单"></asp:Label><br />
    <div class="OrderFilterDiv">
         <table width="80%" style =" margin-left:10%" id="searchOrderTable">
            <tr>
                <td>
                    宝贝名称：
                    <asp:TextBox ID="ItemNameTextBox" runat="server"></asp:TextBox>
                </td>
                <td>
                    成交时间：从
                    <asp:TextBox  ID="OrderFromTextBox"  Width="100px" runat="server"></asp:TextBox>
                    <cc2:CalendarExtender ID="OrderFromTextBox_CalendarExtender" runat="server"  Format="yyyy-MM-dd" 
                        Enabled="True" TargetControlID="OrderFromTextBox">
                    </cc2:CalendarExtender>
                    到
                    <asp:TextBox  ID="OrderToTextBox" Width="100px" runat="server"></asp:TextBox>
                    <cc2:CalendarExtender ID="OrderToTextBox_CalendarExtender" runat="server"  Format="yyyy-MM-dd" 
                        Enabled="True" TargetControlID="OrderToTextBox">
                    </cc2:CalendarExtender>
                </td>
                <td>
                    评价状态：
                    <asp:DropDownList ID="TradeRateDropDownList" runat="server" Width="150px">
                        <asp:ListItem Value="" >全部</asp:ListItem>
                        <asp:ListItem Value="需我评价" >需我评价</asp:ListItem> 
                        <asp:ListItem Value="我已评价" >我已评价</asp:ListItem>
                        <asp:ListItem Value="对方未评" >对方未评</asp:ListItem>
                        <asp:ListItem Value="对方已评" >对方已评</asp:ListItem>
                        <asp:ListItem Value="双方已评" >双方已评</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    卖家昵称：
                    <asp:TextBox ID="SellerNickTextBox" runat="server"></asp:TextBox>
                </td>
                <td>
                    订单状态：
                    <asp:DropDownList ID="OrderStatusDropDownList" AppendDataBoundItems="true" runat="server" Width="200px">
                        <asp:ListItem Value ="" >全部</asp:ListItem>
                        <asp:ListItem Value ="交易完成" >已完成</asp:ListItem>
                        <asp:ListItem Value ="交易关闭" >已关闭</asp:ListItem>
                        <asp:ListItem Value ="未结订单" >未结订单</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <%--售后服务：
                    <asp:DropDownList ID="SellServiceDropDownList" runat="server" Width="150px">
                        <asp:ListItem Value ="" >全部</asp:ListItem>
                        <asp:ListItem Value ="退款中" >退款中</asp:ListItem>
                        <asp:ListItem Value ="已投诉" >已投诉</asp:ListItem>
                    </asp:DropDownList>--%>
                </td>
            </tr>
            <tr>
                <td>
                    物流服务：
                    <asp:DropDownList ID="PostServiceDropDownList" runat="server" Width="150px">
                        <asp:ListItem Value ="" >全部</asp:ListItem>
                        <asp:ListItem Value ="货到付款" >货到付款</asp:ListItem>
                        <asp:ListItem Value ="快递" >快递</asp:ListItem>
                        <asp:ListItem Value ="平邮" >平邮</asp:ListItem>
                        <asp:ListItem Value ="EMS" >EMS</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="SearchOrderButton" runat="server" Text="搜索" 
                        onclick="SearchOrderButton_Click" />
                </td>
                <td>
                </td>
            </tr>
         </table>
         <div style =" text-align:center; padding-left:15%;">
            <a id="searchFilterAnchor" title ="展开/折叠 设置搜索条件" onclick ="collapseByAnchor(this);">展开/折叠</a>
        </div>  
    </div>   <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
       Width="100%" DataKeyNames="RECID"
        BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
        CellPadding="4" ForeColor="Black" GridLines="Vertical">
        <RowStyle BackColor="#F7F7DE" />
        <Columns>
            <asp:TemplateField HeaderText="图片"><ItemTemplate><asp:Image ID="Image2" runat="server" ImageUrl='<%#Eval("taobaopic_path")%>' Width="60px"  Height="60px" /></ItemTemplate></asp:TemplateField>
            <asp:BoundField DataField="seller_nick" HeaderText="卖家" />
            <asp:BoundField DataField="taobaoname" HeaderText="商品名称" />
            <asp:BoundField DataField="taobaoprice" HeaderText="单价" />
            <asp:BoundField DataField="taobaonum" HeaderText="数量" />
            <asp:BoundField DataField="taobaocreated" HeaderText="创建时间" />
            <asp:BoundField DataField="taobaopayment" HeaderText="应付金额" />
            <asp:BoundField DataField="cbtrantype" HeaderText="物流方式" /> 
            <asp:BoundField DataField="taobaostatus" HeaderText="订单状态" />
            <asp:TemplateField HeaderText="评价状态">
                <ItemTemplate>
                    <span style ="color:Blue;" ><%#GetRateStr(Eval("taobaoseller_rate").ToString (),Eval ("taobaobuyer_rate").ToString () )%></span>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCC99" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>

<cc1:WebPager ID="WebPager1" runat="server" ControlToPaginate="GridView1" OnPageIndexChanged ="WebPager1_PageIndexChanged"
    PageSize="20" />
<script type="text/javascript">
    function collapseByAnchor(thisObj) {
        var searchOrderTable = document.getElementById("searchOrderTable");
        if (searchOrderTable.style.display != "none") {
            thisObj.className = "collapsed";
            searchOrderTable.style.display = "none";
            //setCookie("f980", "searchFilterDisplay", "none");
        }
        else {
            thisObj.className = "";
            searchOrderTable.style.display = "block";
            //setCookie("f980", "searchFilterDisplay", "block");
        }
    }
</script>
</asp:Content>

